package com.lc.cehui.ui.adapter;

import android.graphics.Color;
import android.widget.ImageView;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.lc.cehui.R;
import com.lc.cehui.http.glide.GlideApp;
import com.lc.cehui.http.response.GoodsDetailsBean;
import com.lc.cehui.ui.bean.ChoiceBean;

import java.util.List;

public class RecommendGoodsAdapter  extends BaseQuickAdapter<GoodsDetailsBean.DataBean.RecommendBean, BaseViewHolder> {
    public RecommendGoodsAdapter(int layoutResId, @Nullable List<GoodsDetailsBean.DataBean.RecommendBean> data) {
        super(layoutResId, data);
    }

    @Override
    protected void convert(@NonNull BaseViewHolder holder, GoodsDetailsBean.DataBean.RecommendBean item) {
        holder.setText(R.id.tv_name,item.getName()).setText(R.id.tv_money,item.getPrice()).setText(R.id.tv_money_old,item.getY_price());
        GlideApp.with(getContext()).load(item.getCover_img()).into((ImageView) holder.getView(R.id.iv_logo));
    }
}
